<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <script type="text/javascript" src="assets/jwplayer.min.js"></script>
    <title>Error Handling</title>
    <link type="text/css" rel="stylesheet" href="assets/style.css" />

</head>
<body>

<h2>Error Handling</h2>

<div id="player"></div>
<script type="text/javascript">
function loadPlayer(file) {
    var options = {
        debug:'console',
        file: 'http://content.bitsontherun.com/videos/7OCSON1y.mp4',
        height: 270,
        image: 'http://content.bitsontherun.com/thumbs/7OCSON1y-320.jpg',
        plugins: {
            '../captions.js': {
                file: file,
                fontSize: 20
            }
        },
        flashplayer: 'assets/player.swf',
        stretching: 'exactfit',
        width: 480
    };
    jwplayer("player").setup(options);
}
</script>


<ul>
    <li><a href="javascript:loadPlayer('assets/corri.srt')">Nonexisting file</a>
    <li><a href="javascript:loadPlayer('http://www.longtailvideo.com/support/sites/default/files/plain.txt')">Crossdomain loading</a></li>
    <li><a href="javascript:loadPlayer('assets/malformed.srt')">Malformed SRT</a></li>
    <li><a href="javascript:loadPlayer('assets/malformed.xml')">Malformed DFXP</a></li>
</ul>


<p>Test all cases in Flash, and all but the DFXP case in one HTML5/MP4 browser.<br>
    In all cases, the captions should not show up and no error should pop up.<br/>
    However, the browser console should pop a log line with the error.
</p>


</body>
</html>